/**
 * 
 */
package br.com.lazyprogrammer.social.infestit.network;

import java.util.HashMap;

/**
 * 
 * @author Limao Games <br />
 * <b>Email:</b> andreikeda@limaogames.com.br <br />
 * created on: 07/05/2014
 * @version 1.0
 * @see 
 */
public class URLParams {
	
	public URLParams() {
		
	}
	
	public HashMap<String, Object> buildIsUsernameAvailableParams(String username) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.IS_USERNAME_AVAILABLE);
		urlParams.put(ParamConstants.USERNAME, username);
		
		return urlParams;
	}
	
	public HashMap<String, Object> buildLoginParams(String username, String password) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.LOGIN);
		urlParams.put(ParamConstants.PASSWORD, password);
		urlParams.put(ParamConstants.USERNAME, username);
		
		return urlParams;
	}
	
	public HashMap<String, Object> buildOnlineParams(String id) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.ONLINE);
		urlParams.put(ParamConstants.ID, id);
		
		return urlParams;
	}
	
	public HashMap<String, Object> buildOfflineParams(String id) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.OFFLINE);
		urlParams.put(ParamConstants.ID, id);
		
		return urlParams;
	}

	public HashMap<String, Object> buildRegisterParams(String id, String username, String firstName, String lastName, String password, String description, String key) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.REGISTER);
		urlParams.put(ParamConstants.DESCRIPTION, description);
		urlParams.put(ParamConstants.ID, id);
		urlParams.put(ParamConstants.KEY, key);
		urlParams.put(ParamConstants.PASSWORD, password);
		urlParams.put(ParamConstants.USERNAME, username);
        urlParams.put(ParamConstants.FIRST_NAME, firstName);
        urlParams.put(ParamConstants.LAST_NAME, lastName);

        return urlParams;
	}
	
	public HashMap<String, Object> buildValidateParams(String id, String key) {
		HashMap<String, Object> urlParams = new HashMap<String, Object>();
		urlParams.put(ParamConstants.METHOD, ValueConstants.VALIDATE);
		urlParams.put(ParamConstants.ID, id);
		urlParams.put(ParamConstants.KEY, key);
		
		return urlParams;
	}

}
